<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="sec"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Search results</title>
</head>
<body>
Search results:
<br><br>
<table>
	<thead>
		<tr>
			<td>First name</td>
			<td>Last name</td>
			<td>Username</td>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="currentResult" items="${searchResults}">
			<tr>
				<td>${currentResult.firstName}</td>
				<td>${currentResult.lastName}</td>
				<td><a href="${pageContext.request.contextPath}/agents/view/${currentResult.username}">${currentResult.username}</a></td>
			</tr>
		</c:forEach>
	</tbody>
</table>
</body>
</html>